// 统一请求路径前缀在libs/axios.js中修改
import {
  getRequest,
  postRequest,
  formRequest,
  putRequest,
  deleteRequest,
  uploadFileRequest
} from "@/libs/axios";

//send-up

export const getSendUpPageList = params => {
  return getRequest("/bss/sendUp/list", params);
};

export const addSendUp = params => {
  return postRequest("/bss/sendUp/save", params);
};

//send-down

export const getSendDownPageList = params => {
  return getRequest("/bss/sendDown/list", params);
};

export const addSendDown = params => {
  return postRequest("/bss/sendDown/save", params);
};

//event

export const getEventPageList = params => {
  return getRequest("/bss/event/list", params);
};
export const getEventDetail = params => {
  return getRequest("/bss/event/detail", params);
};
export const dealEvent = params => {
  return postRequest("/bss/event/deal", params);
};

//车辆监控
export const getCarTree = params => {
  return getRequest("/bss/car/tree", params);
};
export const getCarZTree = params => {
  return getRequest("/bss/car/ztree", params);
};
export const getCarRealTime = params => {
  return getRequest("/bss/car/realtime", params);
};
export const sendVoice = params => {
  return postRequest("/bss/event/text", params);
};
export const sendSnapshot = params => {
  return postRequest("/bss/event/video/snapshot", params);
};
export const getSnapshotList = params => {
  return getRequest("/bss/media/query", params);
};
export const startVideo = params => {
  return postRequest("/bss/event/video/start", params);
};
export const endVideo = params => {
  return postRequest("/bss/event/video/end", params);
};

//轨迹查询
export const getHistoryTrack = params => {
  return getRequest("/bss/history/track", params);
};
//区域查车
export const getPolygonCarList = params => {
  return getRequest("/bss/realtime/polygon", params);
};
//车辆状态
export const getRealCarPageList = params => {
  return getRequest("/bss/realtime/list", params);
};
//断油电
export const poweroff = params => {
  return postRequest("/bss/device/poweroff", params);
};

//恢复油电
export const poweron = params => {
  return postRequest("/bss/device/poweron", params);
};

//
export const getDeviceZTree = params => {
  return getRequest("/bss/device/ztree", params);
};
